package authority.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 时间帮助类
 * @author shichenyang
 *
 */
public class DateUtil {
	
	public static final String YY="yyyy-MM-dd HH:mm:ss";
	public static final String Y2="yyyy-MM-dd";
	
	
	public static Date convertDate(String d,String f) throws ParseException{
		SimpleDateFormat sdf=new SimpleDateFormat(f);
		if(d==null){
			return null;
		}
		return sdf.parse(d);
	}

}
